﻿@{
    Layout = "~/Views/Shared/_Layout_Form.cshtml";
}

<div style="padding:15px;padding-right:45px;">
    <form id="form" class="form-horizontal" role="form">
        <div class="form-group form-group-sm">
            <label class="col-sm-2 control-label">测试</label>
            <div class="col-sm-2 input-icon-group">
                <select id="productCategory"></select>
                <div class="help-block with-errors"></div>
            </div>
        </div>
        <div class="form-group">
            <button id="submit" type="submit" class="hidden">提交</button>
        </div>
    </form>
</div>

<script type="text/javascript">

    var zNodes = [
        { id: '35143132132ssss', pId: 0, name: "北京" },
        { id: 2, pId: 0, name: "天津" },
        { id: 3, pId: 0, name: "上海" },
        { id: 6, pId: 0, name: "重庆" },
        { id: 4, pId: 0, name: "河北省", open: true },
        { id: 41, pId: 4, name: "石家庄" },
        { id: 42, pId: 4, name: "保定" },
        { id: 43, pId: 4, name: "邯郸" },
        { id: 44, pId: 4, name: "承德" },
        { id: 5, pId: 0, name: "广东省", open: true },
        { id: 51, pId: 5, name: "广州" },
        { id: 52, pId: 5, name: "深圳" },
        { id: 53, pId: 5, name: "东莞" },
        { id: 54, pId: 5, name: "佛山" },
        { id: 6, pId: 0, name: "福建省", open: true },
        { id: 61, pId: 6, name: "福州" },
        { id: 62, pId: 6, name: "厦门" },
        { id: 63, pId: 6, name: "泉州" },
        { id: 64, pId: 6, name: "三明" }
    ];

    $(function () {
        $('#productCategory').zTreeSelect({
            value: 64,
            data: zNodes
        });
    });
</script>